<?php
include('../../common.php');
if($_SESSION['log_islogin'] == 'yes' ){

	$postcode = intval(mysql_real_escape_string($_GET['postcode']));
	$qList = "SELECT a.post_office AS city, s.name AS state 
				FROM lookup_postcode a , lookup_state s 
				WHERE 1=1 AND a.state_code=s.code  AND  postcode='$postcode' LIMIT 0,1";
	$rList = $db->sql_list($qList);	

	$city = $rList['city'];
	$state = $rList['state'];

	echo $city.','.$state;

}else{
	echo 'Dude!';
}

?>